<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>用户管理</title>
		<link rel="stylesheet" type="text/css" href="css/base.css"/>
		<link rel="stylesheet" type="text/css" href="css/usermanager.css"/>
		<link rel="stylesheet" type="text/css" href="css/_table.css"/>
		<script src="js/usermanager_operation.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/usermanager_page.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<section id="show_table">
			<nav id="keyword_query">
				<div id="div_query">
				用户名：<input type="text" name="keyword" id="keyword" value="${requestScope.page.keyword}">
				<button type="button" id="btn_query">查询</button>
				</div>
			</nav>
			<article id="table">
				<table>
					<tbody>
						<tr>
							<th><input type="checkbox" id="all"></th>
							<th>name</th>
							<th>password</th>
							<th>telephone</th>
						</tr>
						<c:forEach items="${requestScope.page.list}" var="user">
						<tr>
							<td><input type="checkbox" id="${user.id}" name="id_check"></td>
							<td>${user.name}</td>
							<td>${user.password}</td>
							<td>${user.telephone}</td>
						</tr>
						</c:forEach>							
					</tbody>
				</table>
			</article>
			<nav id="operation">
				
				<div id="btns_operation">
					<button id="btn_addUser">新增</button>
					<button id="btn_updateUser">修改</button>
					<button id="btn_deleteUser">删除</button>
				</div>
				<div id="btns_page">
					当前页数：<h6 id="currentPage">${page.currentPage}</h6>&nbsp;
					总页数：<h6 id="totalPage">${page.totalPage}</h6>&nbsp;
					每页的行数：${page.rowPage}&nbsp;
					总行数：${page.totalRow}&nbsp;
					<button id="btn_firstPage">首页</button>
					<button id="btn_prePage">上一页</button>
					&nbsp;
					<select id="select_jumpPage">
						<c:forEach begin="1" end="${requestScope.page.totalPage}" var="page">
							<c:if test="${page==requestScope.page.currentPage}">
								<option value="${page}" selected>${page}</option>
							</c:if>
							<c:if test="${page!=requestScope.page.currentPage}">
								<option value="${page}">${page}</option>
							</c:if>
						</c:forEach>
					</select>
					&nbsp;
					<input type="text" id="input_page" value="${requestScope.page.currentPage}">
					<button id="btn_go">Go</button>
					&nbsp;
					<button id="btn_nextPage">下一页</button>
					<button id="btn_lastPage">末页</button>
				</div>
			</nav>
		</section>
	</body>
</html>
